Skip to content

fix(table): prevent update loop on server side pagination #733 - #761

Merged
airikej merged 1 commit into
rcfrom
chore/733-table-storybook-server-side-example-buttons-crash-browser
Jul 29, 2026
Merged

fix(table): prevent update loop on server side pagination #733#761
airikej merged 1 commit into
rcfrom
chore/733-table-storybook-server-side-example-buttons-crash-browser

Conversation

@airikej

@airikej airikej commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Updated table pagination behavior so page indexes no longer reset automatically by default when manual pagination is enabled.
    • Preserved automatic page-index resets for client-side pagination.
    • Improved documentation describing the default behavior of the page-index reset option.

@airikej airikej linked an issue Jul 28, 2026 that may be closed by this pull request
@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The table’s autoResetPageIndex documentation and runtime default now distinguish client-side and manual pagination. Explicit prop values remain respected, while omitted values default to !manualPagination.

Changes

Table pagination reset

Layer / File(s) Summary
Mode-dependent reset default
src/tedi/components/content/table/table.tsx
Documents mode-specific defaults, preserves an omitted autoResetPageIndex value during destructuring, and applies !manualPagination when configuring useReactTable.

Estimated code review effort: 2 (Simple) | ~5 minutes

Suggested reviewers: mart-sessman

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: fixing server-side pagination behavior to avoid update loops.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/733-table-storybook-server-side-example-buttons-crash-browser

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@airikej

airikej commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/tedi/components/content/table/table.tsx (1)

1079-1079: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add regression coverage for both default modes.

Test omitted autoResetPageIndex with client-side pagination and with manualPagination, in addition to the existing explicit-value test. This protects the new ?? !manualPagination branch and satisfies the component coverage requirement.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/tedi/components/content/table/table.tsx` at line 1079, Add regression
tests for the table configuration covering omitted autoResetPageIndex with
client-side pagination and with manualPagination, alongside the existing
explicit-value test. Verify the defaults resolve to true when manualPagination
is disabled and false when it is enabled, exercising the autoResetPageIndex
fallback.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/tedi/components/content/table/table.tsx`:
- Line 1079: Add regression tests for the table configuration covering omitted
autoResetPageIndex with client-side pagination and with manualPagination,
alongside the existing explicit-value test. Verify the defaults resolve to true
when manualPagination is disabled and false when it is enabled, exercising the
autoResetPageIndex fallback.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: fd2f0b89-d76e-4469-afdd-87c96fbe8c60

📥 Commits

Reviewing files that changed from the base of the PR and between dfbddc4 and af66aa1.

📒 Files selected for processing (1)
  • src/tedi/components/content/table/table.tsx

@airikej
airikej requested a review from ly-tempel-bitweb July 28, 2026 11:15
@airikej
airikej merged commit febec64 into rc Jul 29, 2026
19 checks passed
@airikej
airikej deleted the chore/733-table-storybook-server-side-example-buttons-crash-browser branch July 29, 2026 09:06
github-actions Bot pushed a commit that referenced this pull request Jul 29, 2026
# [18.1.0-rc.19](react-18.1.0-rc.18...react-18.1.0-rc.19) (2026-07-29)

### Bug Fixes

* **table:** prevent update loop on server side pagination [#733](#733) ([#761](#761)) ([febec64](febec64))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Table]: Storybook Server Side example buttons crash browser

2 participants